<extend name="Public/layout"/>
<block name="body">
    <div class="builder {$builder_class}">
        <div class="row">
            <notempty name="tab_list">
                <div class="col-xs-12">
                    <ul class="nav nav-tabs">
                        <volist name="tab_list" id="tab">
                            <li class="<php>if($current_tab == $key) echo 'active';</php>"><a href="{:U($tab_url, array('tab' => $key,'id' =>$uid))}">{$tab}<if condition='$key eq $current_tab'>({$total|default='0'})</if></a></li>
                        </volist>
                    </ul>
                    <div class="blank"></div>
                </div>
            </notempty>
            <div class="col-xs-12">
                <div class="table-responsive">
                    <table class="table table-hover">
                        <thead>
                            <tr>
                                <!--<th><input class="check-all" type="checkbox"></th>-->
                                <th>用户ID</th>
                        <eq name="current_tab" value="3">
                        <th>提现金额</th>
                        <th>银行卡</th>
                        <th>卡号</th>
                        <th>状态</th>
                        </eq>
                        <eq name="current_tab"  value="4">
                        <th>昵称</th>
                        <th>所处等级</th>
                        <th>可兑换余额</th>
                        <th>充值币</th>
                        </eq>
                        <if condition="($current_tab neq 3) and ($current_tab neq 4)">
                            <th>订单号</th>
                            <th>订单金额</th>
                            <th>商品IDs</th>
                        </if>
                        <!--<th>实际总佣金</th>-->
                        <th>创建时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="list" id="data">
                            <tr>                              
                            <eq name="current_tab" value="4">
                            <td>{$data.id}</td>
                            <else />
                            <td>{$data.user_id}</td>
                            </eq>
                            <eq name="current_tab" value="3">
                            <td>{$data.total}</td>
                            <td>{$data.bank}</td>
                            <td>{$data.account}</td>
                            <td> 
                            <if condition="$data['status'] eq 1">
                                已提现
                                <else />
                                未发放
                            </if>
                            </td>
                            </eq>
                            <eq name="current_tab" value="4">
                            <td>{$data.nickname}</td>
                            <td>{$data.lvl}</td>
                            <td>{$data.balance}</td>
                            <td>{$data.recharge}</td>
                            </eq>
        
                            <if condition ="($current_tab neq 3) and ($current_tab neq 4)">
                                <td>{$data.order_no}</td>
                                <td>{$data.total}</td>
                                <td>{$data.ids}</td>
                            </if>
                            <!--<td>{$data.commission_total_fact}</td>-->
                            <td>{$data.create_time|date="Y-m-d H:i",###}</td>
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

    <!--    <script type="text/javascript">
            //搜索功能
            $("#search").click(function () {
                var url = $(this).attr('url');
                var query = $('.search-form').find('input').serialize();
                query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
                query = query.replace(/^&/g, '');
                if (url.indexOf('?') > 0) {
                    url += '&' + query;
                } else {
                    url += '?' + query;
                }
                window.location.href = url;
            });
    
            //回车搜索
            $(".search-input").keyup(function (e) {
                if (e.keyCode === 13) {
                    $("#search").click();
                    return false;
                }
            });
        </script>-->
</block>
